package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AlpStagePredictMapper;
import com.ruoyi.system.domain.AlpStagePredict;
import com.ruoyi.system.service.IAlpStagePredictService;
import com.ruoyi.common.core.text.Convert;

/**
 * 预测收款Service业务层处理
 * 
 * @author zhangjun
 * @date 2020-02-15
 */
@Service
public class AlpStagePredictServiceImpl implements IAlpStagePredictService 
{
    @Autowired
    private AlpStagePredictMapper alpStagePredictMapper;

    /**
     * 查询预测收款
     * 
     * @param id 预测收款ID
     * @return 预测收款
     */
    @Override
    public AlpStagePredict selectAlpStagePredictById(Long id)
    {
        return alpStagePredictMapper.selectAlpStagePredictById(id);
    }

    @Override
    public List<AlpStagePredict> selectAlpStagePredictByStageId(Long stageId)
    {
        return alpStagePredictMapper.selectAlpStagePredictByStageId(stageId);
    }

    /**
     * 查询预测收款列表
     * 
     * @param alpStagePredict 预测收款
     * @return 预测收款
     */
    @Override
    public List<AlpStagePredict> selectAlpStagePredictList(AlpStagePredict alpStagePredict)
    {
        return alpStagePredictMapper.selectAlpStagePredictList(alpStagePredict);
    }

    /**
     * 新增预测收款
     * 
     * @param alpStagePredict 预测收款
     * @return 结果
     */
    @Override
    public int insertAlpStagePredict(AlpStagePredict alpStagePredict)
    {
        return alpStagePredictMapper.insertAlpStagePredict(alpStagePredict);
    }

    /**
     * 修改预测收款
     * 
     * @param alpStagePredict 预测收款
     * @return 结果
     */
    @Override
    public int updateAlpStagePredict(AlpStagePredict alpStagePredict)
    {
        return alpStagePredictMapper.updateAlpStagePredict(alpStagePredict);
    }

    /**
     * 删除预测收款对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAlpStagePredictByIds(String ids)
    {
        return alpStagePredictMapper.deleteAlpStagePredictByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除预测收款信息
     * 
     * @param id 预测收款ID
     * @return 结果
     */
    @Override
    public int deleteAlpStagePredictById(Long id)
    {
        return alpStagePredictMapper.deleteAlpStagePredictById(id);
    }
}
